/**
*
* author ThuanLT
* Aug 22, 2014
*
*/

package vn.fsoft.gst.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import vn.fsoft.gst.dao.AddressDAO;
import vn.fsoft.gst.domain.Address;

@Service
public class AddressServiceImpl implements AddressService{
	@Autowired
	private AddressDAO addressdao;
	
	public int addAddress(Address address) {
		return addressdao.addAddress(address);
	}
    @Transactional
	public void updateAddress(Address address) {
    	addressdao.updateAddress(address);
		
	}
    @Transactional
	public void deleteAddress(int addressID) {
			addressdao.deleteAddress(addressID);
	}
    @Transactional
	public List<Address> getListAdress() {		
		return addressdao.getListAdress();
	}
    @Transactional
	public Address getAddressByID(int addressID) {
		return addressdao.getAddressByID(addressID);
	}

}
